package com.sixstones.fragment.enums;

public enum ResultEnum {

	SUCCESS(1000, "成功"), FAIL(9000, "失败"),

	// catagory error
	CATAGORY_REPEAT(5000, "种类重复"),
	CATAGORY_ADDERROR(5001, "新增失败");

	private int code;
	private String message;

	private ResultEnum(int code, String message) {
		this.code = code;
		this.message = message;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String toString() {
		return "{\"code\":" + this.code + ",\"message\":\"" + message + "\"}";
	}

}
